package com.atguigu.lease.mp.controller;

import lombok.SneakyThrows;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;

@RestController
@RequestMapping("mp")
public class MpController {

    @SneakyThrows
    @PostMapping("fileUpload")
    public String fileUpload(@RequestParam("file") MultipartFile multipartFile) {
        InputStream inputStream = multipartFile.getInputStream();

        return "url";
    }
}
